package com.bosssoft.user.permission.center.serve.pojo.dto;

import common.data.base.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * @className: RouteNodeDTO
 * @description: 每个子菜单的信息
 * @author: lanyukai
 * @date: 2024/6/18 10:05
 * @since 1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("控制层和业务层交互的路由表子菜单信息")
public class RouteNodeDTO extends BaseDTO {
    @ApiModelProperty(value = "资源ID")
    private Long id;

    @ApiModelProperty(value = "资源名称  注意这个也可以是界面上的按钮")
    private String name;

    @ApiModelProperty(value = "子系统ID，预留")
    private Long subSystemId;

    @ApiModelProperty(value = "编号 ")
    private String code;

    @ApiModelProperty(value = "顺序号，控制菜单显示顺序")
    private Integer orderIndex;

    @ApiModelProperty(value = "父亲节点")
    private Long parentId;

    @ApiModelProperty(value = "URL 这个决定加载什么组件 对应import组件")
    private String url;

    @ApiModelProperty(value = "后端接口地址读音组件的 path属性")
    private String api;

    @ApiModelProperty(value = "请求方法，和 api 搭配使用, 1 GET, 2 POST, 3 PUT,4  DELETE")
    private Integer method;

    @ApiModelProperty(value = "打开图标 这个只能取系统预定义的")
    private String openImg;

    @ApiModelProperty(value = "关闭图标  这个只能取系统预定义的")
    private String closeImg;

    @ApiModelProperty(value = "资源类型  这个是菜单还是按钮 0 菜单 1 按钮  ")
    private Integer resourceType;

    @ApiModelProperty(value = "叶子节点")
    private Integer leaf;

    @ApiModelProperty(value = "动作 这个暂时保留")
    private Integer action;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "租户ID")
    private Long tenantId;

    @ApiModelProperty(value = "机构ID")
    private Long orgId;

    @ApiModelProperty(value = "公司")
    private Long companyId;

    @Transient
    private String subSystem;
    @Transient
    private String parentNode;
    @Transient
    private List<RouteNodeDTO> nodes;

}
